#ifndef REVSURF_H_
#define REVSURF_H_

#include <GL/glew.h>
#include <GL/glut.h>
#include <glm/glm.hpp>

#include <math.h>
#include <iostream>
#include <vector>

#include "BSplineCuadCurve.h"
#define DELTAREVSURF 1
#define DETAILNORMALSREVSURF 5

using std::vector;

class revSurf{
	public:
		revSurf();
		revSurf(vector<float>* Points);
		void drawSurface(glm::mat4 mat);
		void drawCurve(glm::mat4 mat);
		void drawNormals(glm::mat4);
		void drawControlPoints();

		void rotateCtrlPoints(float angle);

	private:
		vector<float>* controlPoints;
		vector<float>* surface;
		vector<float>* normals;
		float vectorPerp[3];		
	
		size_t largoCurva;

		void createSurface();
		glm::vec4 transform(glm::mat4 transfMat,float x, float y, float z);
		glm::mat4 rotateY(float ang);
};

#endif
